package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:16:30 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUIPageBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUIPage productUIPage;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUIPage);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUIPageDAO.Id);

    mappedDaoFields.put("domainId", com.ourteam.product.ui.dao.IProductUIPageDAO.DomainId);

    mappedDaoFields.put(
        "pageTemplateId", com.ourteam.product.ui.dao.IProductUIPageDAO.PageTemplateId);

    mappedDaoFields.put("pageCode", com.ourteam.product.ui.dao.IProductUIPageDAO.PageCode);

    mappedDaoFields.put("pageName", com.ourteam.product.ui.dao.IProductUIPageDAO.PageName);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUIPageDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUIPageDAO.Remarks);

    mappedDaoFields.put("domainCode", com.ourteam.product.ui.dao.IProductUIPageDAO.DomainCode);

    mappedDaoFields.put("domainName", com.ourteam.product.ui.dao.IProductUIPageDAO.DomainName);

    mappedDaoFields.put("templateName", com.ourteam.product.ui.dao.IProductUIPageDAO.TemplateName);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUIPageBean() {
    super();

    this.productUIPage = new com.ourteam.product.ui.dao.ProductUIPage();
  }

  public ProductUIPageBean(com.ourteam.product.ui.dao.ProductUIPage productUIPage) {
    super();

    this.productUIPage = productUIPage;
  }

  public com.ourteam.product.ui.dao.ProductUIPage convertToProductUIPage() {
    return this.productUIPage;
  }

  public com.ourteam.product.ui.dao.ProductUIPage convertTo() {
    return this.productUIPage;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUIPage.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUIPage.setId(id);
  }

  /**
   * Get domainId
   *
   * @return long
   */
  public long getDomainId() {
    return (long) this.productUIPage.getDomainId();
  }

  /**
   * Set domainId
   *
   * @parameter long
   */
  public void setDomainId(long domainId) {

    this.productUIPage.setDomainId(domainId);
  }

  /**
   * Get pageTemplateId
   *
   * @return long
   */
  public long getPageTemplateId() {
    return (long) this.productUIPage.getPageTemplateId();
  }

  /**
   * Set pageTemplateId
   *
   * @parameter long
   */
  public void setPageTemplateId(long pageTemplateId) {

    this.productUIPage.setPageTemplateId(pageTemplateId);
  }

  /**
   * Get pageCode
   *
   * @return String
   */
  public String getPageCode() {
    return (String) this.productUIPage.getPageCode();
  }

  /**
   * Set pageCode
   *
   * @parameter String
   */
  public void setPageCode(String pageCode) {

    this.productUIPage.setPageCode(pageCode);
  }

  /**
   * Get pageName
   *
   * @return String
   */
  public String getPageName() {
    return (String) this.productUIPage.getPageName();
  }

  /**
   * Set pageName
   *
   * @parameter String
   */
  public void setPageName(String pageName) {

    this.productUIPage.setPageName(pageName);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUIPage.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUIPage.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUIPage.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUIPage.setRemarks(remarks);
  }

  /**
   * Get domainCode
   *
   * @return String
   */
  public String getDomainCode() {

    return (String) this.productUIPage.getDomainCode();
  }

  /**
   * Get domainName
   *
   * @return String
   */
  public String getDomainName() {

    return (String) this.productUIPage.getDomainName();
  }

  /**
   * Get templateName
   *
   * @return String
   */
  public String getTemplateName() {

    return (String) this.productUIPage.getTemplateName();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUIPageBean) == false) {
      return false;
    } // end if

    ProductUIPageBean other = (ProductUIPageBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUIPage tempProductUIPage = other.convertToProductUIPage();

    if (tempProductUIPage == null || this.productUIPage == null) {
      isEqual = false;
    } else if (tempProductUIPage == this.productUIPage
        || tempProductUIPage.equals(this.productUIPage)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUIPageBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIPage[] aProductUIPages) {

    return toArray(aProductUIPages, null);
  }

  public static ProductUIPageBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIPage[] aProductUIPages, IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUIPages)) {
      return new ProductUIPageBean[0];
    }

    int length = aProductUIPages.length;

    ProductUIPageBean[] beans = new ProductUIPageBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUIPageBean(aProductUIPages[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUIPages[i]});
      }
    }

    return beans;
  }
}
